package com.itic.ht.mem.order.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itic.appbase.framework.common.service.HtCrudService;
import com.itic.ht.mem.order.persistence.dao.MemberOrderDao;
import com.itic.ht.mem.order.persistence.model.MemberOrder;
import com.itic.ht.mem.order.persistence.model.MemberOrderExample;


@Service
@Transactional
public class MemberOrderService
     extends HtCrudService<MemberOrderDao,MemberOrder,MemberOrderExample> {
/*    @Autowired
    private MemberOrderDao memberOrderDao;*/
    
    public MemberOrder getMemberOrderByOrderNum (String orderNum){
    	MemberOrder memberOrder = null;
    	MemberOrderExample example = new MemberOrderExample();
    	example.createCriteria().andOrderNumEqualTo(orderNum);
    	List<MemberOrder> list = this.list(example);
    	if(list!=null && list.size()>0){
    		memberOrder = list.get(0);
    	}
    	return memberOrder;
    	
    }


}